﻿@{
    Layout = "~/Views/Shared/_WebLayout.cshtml";
}
@using MiniWeb.Core.Dtos
@using WFramework.Common
@using WFramework.MvcPager
@model PagedList<ProductsInfoDto>
<script type="text/javascript">
    $(function () {
        
        loadServer();

        $("#rid").change(function () {
         
            loadServer();
        });

    });
    function loadServer() {
        var gameid = $('#rid');
        var serverlist = $('#cid');

        var mtid = gameid.val();
        serverlist.empty();

        $.getJSON('@Url.Action("GetClass", "Goods")', { tid: mtid }, function (data) {
            $.each(data, function (i, item) {
                $("<option></option>").val(item["Value"]).text(item["Text"]).appendTo(serverlist);
            });

            serverlist.val('@ViewData["cid"]');
        });


    }
       
</script>
<style >
.m-licon dl dd{ float: left; margin-left: 30px; width: 40%;}
.m-licon dl dd .btn{width: 60px;
    border: 0;
    border-radius: 0 !important;
    background: #c00;
    border: 1px solid #c00;
    background: #c00 !important;
    cursor: pointer;
    color: #FFF;
  }
</style>
<div class="sub-box">
    <div class="area">
        <div class="top-current">
            <a href="/index.aspx">首页</a><i>&gt;</i><span>鲜花</span>
        </div>
        <!--m-current -->
        <div class="m-sub clear">
            <div class="right-column">
                <div class="m-screening">
                    <ul class="screen j-lastLi clear">
                        <li style="width: 100%" class="last">
                            <div class="m-licon">
                                <dl>
                                    <dd>
                                        <h3>
                                            商品类别</h3>
                                        @Html.DropDownList("rid", ViewData["typelist"] as List<SelectListItem>,new{id="rid"})
                                    </dd>
                                    <dd >
                                        <h3>
                                            商品二级类别</h3>
                                        <select id="cid">
                                           
                                        </select>
                                    </dd>
                                 
                                    <dd>
                                     <h3 style="margin-left: 10px;">
                                    <input class="btn" name="" value="搜索" type="submit"></h3>
                                    </dd>
                                </dl>
                            </div>
                        </li>
                    </ul>
                </div>
                <!--m-screening-->
                <!--m-filter-->
                <div class="sub-prolist">
                    <div class="m-proList">
                        <!--取得一个DataTable-->
                        <!--取得分页页码列表-->
                        <ul class="j-li-hover clear">
                            @foreach(var item in Model)
                            {
                                <li class=""><span class="u-img"><a href="/goods/show/@item.ID" title="">
                                <img src="@item.ProductImg" alt=""></a></span> <span
                                    class="u-price"><em><i>¥</i>@item.Price&nbsp;</em>&nbsp;&nbsp;&nbsp;@(Utils.LeftString(item.ProductName,8))</span>
                                <span class="u-link"><a href="javascript:void(0);" onclick="CartAdd4(this, '/', 0, '/shopping/cart.aspx','208',1);">
                                    加入购物车&gt;&gt;</a><a href="javascript:void(0);" onclick="CartAdd4(this, '/', 1, '/shopping/cart.aspx','208',1);">立即购买&gt;&gt;</a></span>
                            </li>
                            }
                         
                            
                        </ul>
                    </div>
                    <!--m-proList-->
                    <div class="m-page m-page-sr m-page-sm m-page-rt">
                         @Html.Pager(Model)
                    </div>
                    <!--5-->
                </div>
            </div>
        </div>
        <!--m-sub-->
    </div>
</div>
